/**
 * 
 */
package org.jenkon.decorator;

import org.jenkon.filter.Filter;

/**
 * @author Jens Konopka
 * 
 * @param <T> the value type
 */
public abstract class FilterDecorator<T> implements Filter<T> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5591436415588360580L;

	private final Filter<T> filter;

	/**
	 * @param filter the decorating {@link Filter}
	 */
	public FilterDecorator(final Filter<T> filter) {
		this.filter = filter;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.jenkon.filter.Filter#accept(java.lang.Object)
	 */
	public boolean accept(final T value) {
		return filter.accept(value);
	}

}
